import request from '@/utils/request'

// 查询APP中的消息定义列表
export function listDefine(query) {
  return request({
    url: '/app/messageDefine/list',
    method: 'get',
    params: query
  })
}

// 查询APP中的消息定义详细
export function getDefine(messageId) {
  return request({
    url: '/app/messageDefine/' + messageId,
    method: 'get'
  })
}

// 新增APP中的消息定义
export function addDefine(data) {
  return request({
    url: '/app/messageDefine',
    method: 'post',
    data: data
  })
}

// 修改APP中的消息定义
export function updateDefine(data) {
  return request({
    url: '/app/messageDefine',
    method: 'put',
    data: data
  })
}

// 删除APP中的消息定义
export function delDefine(messageId) {
  return request({
    url: '/app/messageDefine/' + messageId,
    method: 'delete'
  })
}

export function getOperationList() {
  return request({
    url: '/app/messageDefine/getOperationList',
    method: 'get'
  })
}

export function getIndustryList() {
  return request({
    url: '/app/messageDefine/getIndustryList',
    method: 'get'
  })
}

export function getShopList(query) {
  return request({
    url: '/app/messageDefine/getShopList?shopName=' + query,
    method: 'get'
  })
}

export function getShopManager(query) {
  return request({
    url: '/app/messageDefine/getShopManager?shopId=' + query,
    method: 'get'
  })
}

export function sendMessage(messageId) {
  return request({
    url: '/app/messageDefine/sendMessage/' + messageId,
    method: 'get'
  })
}
